home *** CD-ROM | disk | FTP | other *** search
- /*
- * Region_ui.c - User interface object initialization functions.
- * This file was generated by `gxv' from `Region.G'.
- * DO NOT EDIT BY HAND.
- */
-
- #include <stdio.h>
- #include <sys/param.h>
- #include <sys/types.h>
- #include <xview/xview.h>
- #include <xview/canvas.h>
- #include <xview/panel.h>
- #include <xview/scrollbar.h>
- #include <xview/svrimage.h>
- #include <xview/termsw.h>
- #include <xview/text.h>
- #include <xview/tty.h>
- #include <xview/xv_xrect.h>
- #include <gcm.h>
- #include "Region_ui.h"
-
- /*
- * Initialize an instance of object `RegionPopup'.
- */
- Region_RegionPopup_objects *
- Region_RegionPopup_objects_initialize(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- if (!ip && !(ip = (Region_RegionPopup_objects *) calloc(1, sizeof (Region_RegionPopup_objects))))
- return (Region_RegionPopup_objects *) NULL;
- if (!ip->RegionPopup)
- ip->RegionPopup = Region_RegionPopup_RegionPopup_create(ip, owner);
- if (!ip->controls1)
- ip->controls1 = Region_RegionPopup_controls1_create(ip, ip->RegionPopup);
- if (!ip->TimeLineMsg)
- ip->TimeLineMsg = Region_RegionPopup_TimeLineMsg_create(ip, ip->controls1);
- if (!ip->TimeLineDocMsg)
- ip->TimeLineDocMsg = Region_RegionPopup_TimeLineDocMsg_create(ip, ip->controls1);
- if (!ip->NumberRegionMsg)
- ip->NumberRegionMsg = Region_RegionPopup_NumberRegionMsg_create(ip, ip->controls1);
- if (!ip->RegionCountMsg)
- ip->RegionCountMsg = Region_RegionPopup_RegionCountMsg_create(ip, ip->controls1);
- if (!ip->RegionSelectMsg)
- ip->RegionSelectMsg = Region_RegionPopup_RegionSelectMsg_create(ip, ip->controls1);
- if (!ip->RegionSelectValueMsg)
- ip->RegionSelectValueMsg = Region_RegionPopup_RegionSelectValueMsg_create(ip, ip->controls1);
- if (!ip->RegionListHeaderMsg)
- ip->RegionListHeaderMsg = Region_RegionPopup_RegionListHeaderMsg_create(ip, ip->controls1);
- if (!ip->RegionList)
- ip->RegionList = Region_RegionPopup_RegionList_create(ip, ip->controls1);
- if (!ip->CurrentRegionMsg)
- ip->CurrentRegionMsg = Region_RegionPopup_CurrentRegionMsg_create(ip, ip->controls1);
- if (!ip->StartRegionMsg)
- ip->StartRegionMsg = Region_RegionPopup_StartRegionMsg_create(ip, ip->controls1);
- if (!ip->StartRegionValueMsg)
- ip->StartRegionValueMsg = Region_RegionPopup_StartRegionValueMsg_create(ip, ip->controls1);
- if (!ip->EndRegionMsg)
- ip->EndRegionMsg = Region_RegionPopup_EndRegionMsg_create(ip, ip->controls1);
- if (!ip->EndRegionValueMsg)
- ip->EndRegionValueMsg = Region_RegionPopup_EndRegionValueMsg_create(ip, ip->controls1);
- if (!ip->RegionLabelText)
- ip->RegionLabelText = Region_RegionPopup_RegionLabelText_create(ip, ip->controls1);
- if (!ip->InsertRegionButton)
- ip->InsertRegionButton = Region_RegionPopup_InsertRegionButton_create(ip, ip->controls1);
- if (!ip->DeleteRegionButton)
- ip->DeleteRegionButton = Region_RegionPopup_DeleteRegionButton_create(ip, ip->controls1);
- if (!ip->ModifyRegionButton)
- ip->ModifyRegionButton = Region_RegionPopup_ModifyRegionButton_create(ip, ip->controls1);
- if (!ip->ClearAllRegionButton)
- ip->ClearAllRegionButton = Region_RegionPopup_ClearAllRegionButton_create(ip, ip->controls1);
- if (!ip->RegionDoneButton)
- ip->RegionDoneButton = Region_RegionPopup_RegionDoneButton_create(ip, ip->controls1);
- return ip;
- }
-
- /*
- * Create object `RegionPopup' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_RegionPopup_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, FRAME_CMD,
- XV_KEY_DATA, INSTANCE, ip,
- XV_WIDTH, 444,
- XV_HEIGHT, 274,
- XV_LABEL, "Region Info Window",
- FRAME_SHOW_FOOTER, TRUE,
- FRAME_SHOW_RESIZE_CORNER, FALSE,
- FRAME_CMD_PUSHPIN_IN, FALSE,
- NULL);
- xv_set(xv_get(obj, FRAME_CMD_PANEL), WIN_SHOW, FALSE, NULL);
- return obj;
- }
-
- /*
- * Create object `controls1' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_controls1_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 0,
- XV_Y, 0,
- XV_WIDTH, WIN_EXTEND_TO_EDGE,
- XV_HEIGHT, WIN_EXTEND_TO_EDGE,
- WIN_BORDER, FALSE,
- NULL);
- gcm_initialize_colors(obj, "Light Gray", NULL);
- return obj;
- }
-
- /*
- * Create object `TimeLineMsg' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_TimeLineMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 16,
- XV_Y, 8,
- PANEL_ITEM_COLOR, gcm_color_index("Black"),
- PANEL_LABEL_STRING, "TimeLine Editor : ",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `TimeLineDocMsg' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_TimeLineDocMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 144,
- XV_Y, 8,
- PANEL_ITEM_COLOR, gcm_color_index("Black"),
- PANEL_LABEL_STRING, "docname",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `NumberRegionMsg' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_NumberRegionMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 20,
- XV_Y, 28,
- PANEL_ITEM_COLOR, gcm_color_index("Black"),
- PANEL_LABEL_STRING, "# of regions :",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `RegionCountMsg' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_RegionCountMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 144,
- XV_Y, 28,
- PANEL_ITEM_COLOR, gcm_color_index("Black"),
- PANEL_LABEL_STRING, "0",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `RegionSelectMsg' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_RegionSelectMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 280,
- XV_Y, 28,
- PANEL_ITEM_COLOR, gcm_color_index("Black"),
- PANEL_LABEL_STRING, "Selected region :",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `RegionSelectValueMsg' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_RegionSelectValueMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 404,
- XV_Y, 28,
- PANEL_ITEM_COLOR, gcm_color_index("Black"),
- PANEL_LABEL_STRING, "0",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `RegionListHeaderMsg' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_RegionListHeaderMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 40,
- XV_Y, 48,
- PANEL_ITEM_COLOR, gcm_color_index("Black"),
- PANEL_LABEL_STRING, "Region # Label Start End ",
- PANEL_LABEL_BOLD, FALSE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `RegionList' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_RegionList_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- extern int RegionListNotify(Panel_item, char *, Xv_opaque, Panel_list_op, Event *, int);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_LIST,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 8,
- XV_Y, 68,
- PANEL_LIST_WIDTH, 400,
- PANEL_LIST_DISPLAY_ROWS, 4,
- PANEL_ITEM_COLOR, gcm_color_index("Black"),
- PANEL_LAYOUT, PANEL_HORIZONTAL,
- PANEL_READ_ONLY, TRUE,
- PANEL_CHOOSE_ONE, TRUE,
- PANEL_CHOOSE_NONE, TRUE,
- PANEL_NOTIFY_PROC, RegionListNotify,
- NULL);
- return obj;
- }
-
- /*
- * Create object `CurrentRegionMsg' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_CurrentRegionMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 24,
- XV_Y, 172,
- PANEL_ITEM_COLOR, gcm_color_index("Black"),
- PANEL_LABEL_STRING, "Current Region : ",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `StartRegionMsg' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_StartRegionMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 24,
- XV_Y, 192,
- PANEL_ITEM_COLOR, gcm_color_index("Black"),
- PANEL_LABEL_STRING, "Start : ",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `StartRegionValueMsg' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_StartRegionValueMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 80,
- XV_Y, 192,
- PANEL_ITEM_COLOR, gcm_color_index("Black"),
- PANEL_LABEL_STRING, " 00:00",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `EndRegionMsg' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_EndRegionMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 192,
- XV_Y, 192,
- PANEL_ITEM_COLOR, gcm_color_index("Black"),
- PANEL_LABEL_STRING, "End : ",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `EndRegionValueMsg' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_EndRegionValueMsg_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 236,
- XV_Y, 192,
- PANEL_ITEM_COLOR, gcm_color_index("Black"),
- PANEL_LABEL_STRING, " 00:00",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `RegionLabelText' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_RegionLabelText_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_TEXT,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 24,
- XV_Y, 212,
- PANEL_VALUE_DISPLAY_LENGTH, 22,
- PANEL_VALUE_STORED_LENGTH, 256,
- PANEL_ITEM_COLOR, gcm_color_index("Black"),
- PANEL_LABEL_STRING, "Label : ",
- PANEL_LAYOUT, PANEL_HORIZONTAL,
- PANEL_READ_ONLY, FALSE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `InsertRegionButton' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_InsertRegionButton_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- extern void InsertRegion(Panel_item, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 32,
- XV_Y, 240,
- PANEL_ITEM_COLOR, gcm_color_index("Black"),
- PANEL_LABEL_STRING, "Insert",
- PANEL_NOTIFY_PROC, InsertRegion,
- NULL);
- return obj;
- }
-
- /*
- * Create object `DeleteRegionButton' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_DeleteRegionButton_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- extern void DeleteRegion(Panel_item, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 108,
- XV_Y, 240,
- PANEL_ITEM_COLOR, gcm_color_index("Black"),
- PANEL_LABEL_STRING, "Delete",
- PANEL_NOTIFY_PROC, DeleteRegion,
- NULL);
- return obj;
- }
-
- /*
- * Create object `ModifyRegionButton' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_ModifyRegionButton_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- extern void ModifyRegion(Panel_item, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 184,
- XV_Y, 240,
- PANEL_ITEM_COLOR, gcm_color_index("Black"),
- PANEL_LABEL_STRING, "Modify",
- PANEL_NOTIFY_PROC, ModifyRegion,
- NULL);
- return obj;
- }
-
- /*
- * Create object `ClearAllRegionButton' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_ClearAllRegionButton_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- extern void ClearAllRegion(Panel_item, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 264,
- XV_Y, 240,
- PANEL_ITEM_COLOR, gcm_color_index("Black"),
- PANEL_LABEL_STRING, "Clear All",
- PANEL_NOTIFY_PROC, ClearAllRegion,
- NULL);
- return obj;
- }
-
- /*
- * Create object `RegionDoneButton' in the specified instance.
- */
- Xv_opaque
- Region_RegionPopup_RegionDoneButton_create(Region_RegionPopup_objects *ip, Xv_opaque owner)
- {
- extern void CloseRegionPopup(Panel_item, Event *);
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 352,
- XV_Y, 240,
- PANEL_ITEM_COLOR, gcm_color_index("Black"),
- PANEL_LABEL_STRING, "Done",
- PANEL_NOTIFY_PROC, CloseRegionPopup,
- NULL);
- return obj;
- }
-
-